﻿using FoundationLib.AddIns.Constraints.Resources;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FoundationLib.AddIns.Constraints
{
	/// <summary>
	/// Provides access to formats
	/// </summary>
	public static class FormatManager
	{
		/// <summary>
		/// Returns the format for the given key, taking the prefix set in the current context into account
		/// </summary>
		/// <param name="key">The format key</param>
		/// <returns>The format</returns>
		public static string GetFormat(string key)
		{
			return Formats.ResourceManager.GetString(String.Format("{0}_{1}", Context.Current.ResourcePrefix, key));
		}
	}
}
